package com.starlink.model.util;

import com.starlink.model.dtomapper.OtherOrderDtoMapper;
import com.starlink.model.domain.OtherOrderDO;
import com.starlink.model.vo.OtherOrderVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class OtherOrderConvert {

    public static List<OtherOrderVO> buildOtherOrderVoList(List<OtherOrderDO> otherOrderDOList) {
        if (CollectionUtils.isEmpty(otherOrderDOList)) {
            return Lists.newArrayList();
        }
        List<OtherOrderVO> otherOrderVOList = new ArrayList<>();
        for (OtherOrderDO otherOrderDO : otherOrderDOList) {
            otherOrderVOList.add(OtherOrderDtoMapper.INSTANCE.do2VO(otherOrderDO));
        }

        return otherOrderVOList;
    }
}
